package jsen.tool.ddd.demo.domain.brand.factory;

import jsen.tool.ddd.demo.domain.brand.Brand;
import jsen.tool.ddd.demo.domain.brand.spec.BrandSpecFactory;
import jsen.tool.ddd.domain.Factory;

/**
 * 领域模型的构建
 *
 * @author jsen
 * @date 2021/10/6
 */
@Factory
public class BrandFactory {

    public static Brand buildBrand(String brandName) {
        return Brand.builder().name(brandName).strict(BrandSpecFactory.buildSpec()).build();
    }
}
